package com.example.demo.behavior.chain;

/**
 * @Desc:
 * @Author zzz
 * @Date 2021/2/27
 * @Version V1.0
 */
public class JiaPeng extends Leader {
    @Override
    public void handle(Staff staff) {
        int days = staff.getLeaveDays();
        if (days <= 7) {
            System.out.println(String.format("加朋批准了%s %d天假期", staff.getName(), days));
        } else {
            nextHandle(staff);
        }
    }
}
